package com.itheima.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.itheima.dao.ProductDAO;
import com.itheima.domain.Standard;
import com.itheima.service.StandardService;
@Service
@Transactional
public class StandardServceiImpl implements StandardService {
	@Autowired
	private ProductDAO productDao;
	
	@Override
	public void save(Standard standard) {
		productDao.save(standard);
	}

	@Override
	public void updateStandard(String string, int i) {
		// TODO Auto-generated method stub
		productDao.updateStandard(string, i);
	}

	@Override
	public Page<Standard> findPageData(Pageable pageable) {
		// TODO Auto-generated method stub
		return productDao.findAll(pageable);
	}

	@Override
	public List<Standard> findAll() {
		// TODO Auto-generated method stub
		return productDao.findAll();
	}

}
